home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / Sys::Hostname.Z / Sys::Hostname
Encoding:
Text File  |  1998-10-28  |  1.2 KB  |  67 lines

  1.  
  2.  
  3.  
  4.      SSSSyyyyssss::::::::HHHHoooossssttttnnnnaaaammmmeeee((((3333))))22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222)))) SSSSyyyyssss::::::::HHHHoooossssttttnnnnaaaammmmeeee((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       Sys::Hostname    - Try every conceivable    way to get hostname
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           use Sys::Hostname;
  13.           $host = hostname;
  14.  
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.       Attempts several methods of getting the system hostname and
  18.       then caches the result.  It tries syscall(SYS_gethostname),
  19.       `hostname`, `uname -n`, and the file /_c_o_m/_h_o_s_t.  If all that
  20.       fails    it croaks.
  21.  
  22.       All nulls, returns, and newlines are removed from the
  23.       result.
  24.  
  25.      AAAAUUUUTTTTHHHHOOOORRRR
  26.       David    Sundstrom <_s_u_n_d_s@_a_s_i_c_t_e_s_t._s_c._t_i._c_o_m>
  27.  
  28.       Texas    Instruments
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.